package com.web.kdl.pojo.Vo;

import cn.hutool.core.date.DateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author： shulibin
 * @Date： 2025/7/29 8:27
 * @Describe：
 */
@Data
@NoArgsConstructor
public class EnergyDataVo {
        private String time; // 时间
        private double charge; // 充电量
        private double discharge; // 放电量

        // 构造函数
        public EnergyDataVo(String time, double charge, double discharge) {
            this.time = time;
            this.charge = charge;
            this.discharge = discharge;
        }

        // Getter 和 Setter 方法
        public String getTime() {
            return time;
        }

        public void setTime(String time) {
            this.time = time;
        }

        public double getCharge() {
            return charge;
        }

        public void setCharge(double charge) {
            this.charge = charge;
        }

        public double getDischarge() {
            return discharge;
        }

        public void setDischarge(double discharge) {
            this.discharge = discharge;
        }
        public void Add( double charge, double discharge){
            this.charge=this.charge+charge;
            this.discharge=this.discharge+discharge;
        }
}
